#ifndef INFINITY_SERVICE_ENTITY_INL
#	define INFINITY_SERVICE_ENTITY_INL

namespace infinity {

inline ServiceEntity::ServiceEntity()
:	super()
,	m_nextId(1UL)
{
}

template< class T >
T* ServiceEntity::spawnEntity(const std::string& name)
{
	T* newEntity = new T();

	newEntity->setId(m_nextId);
	newEntity->setName(name);
	newEntity->setLifeState(Entity::LifeState_Borning);

	m_nextId.id++;

	m_borningEntities.push_back(newEntity);

	return newEntity;
}

template< class T >
T* ServiceEntity::spawnEntityFromArchetype(const std::string& name, const EntityId& achetypeId)
{
	dwStaticAssert(false, NotImplemented);

	return NULL;
}

std::vector< Entity * >& ServiceEntity::getLivingEntity()
{
	return m_entities;
}

} // namespace infinity

#endif // !INFINITY_SERVICE_ENTITY_INL
